package model

//订单详情表

type OrderInfo struct {
	BaseModel
	OrderId     uint    `form:"order_id" json:"order_id" gorm:"not null;default:0;comment:订单表order主键id"`
	OrderSc     string  `form:"order_sc" json:"order_sc"  gorm:"not null;comment:订单号"`
	GoodsId     uint    `form:"goods_id" json:"goods_id" gorm:"not null;default:0;comment:商品表goods主键id"`
	BossId      uint    `form:"boss_id" json:"boss_id" gorm:"not null;default:0;comment:商家表boss主键id,0表示自营"`
	GoodsSc     string  `form:"goods_sc" json:"goods_sc" gorm:"type:varchar(120);comment:商品表goods商品货号"`
	GoodsName   string  `form:"goods_name" json:"goods_name" gorm:"not null;comment:商品表goods商品名"`
	ImgUrl      string  `form:"img_url" json:"img_url" gorm:"type:varchar(100) not null;comment:商品表goods商品封面图"`
	MarkPrice   float64 `form:"mark_price" json:"mark_price" gorm:"type:decimal(10,2) not null;default:0.00;comment:商品表goods市场价"`
	ShopPrice   float64 `form:"shop_price" json:"shop_price" gorm:"type:decimal(10,2) not null;default:0.00;comment:商品表goods商店价"`
	CostPrice   float64 `form:"cost_price" json:"cost_price" gorm:"type:decimal(10,2) not null;default:0.00;comment:商品表goods会员折扣价"`
	MemberPrice float64 `form:"member_price" json:"member_price" gorm:"type:decimal(10,2) not null;default:0.00;comment:商品表goods会员折扣价"`
	BuyNum      uint    `form:"buy_num" json:"buy_num" gorm:"not null;default:1;comment:购买的数量"`

	GiveIntegral uint `form:"give_integral" json:"give_integral" gorm:"type:mediumint(8) not null;default:0;comment:购买商品赠送积分"`

	SpecKey     string `form:"spec_key" json:"spec_key" gorm:"type:varchar(100);comment:商品规格key对应的spec_goods_price表"`
	SpecKeyName string `form:"spec_key_name" json:"spec_key_name" gorm:"type:varchar(100);comment:商品规格组合名称"`
	PromType    uint   `form:"prom_type" json:"prom_type" gorm:"type:tinyint(1) not null;default:0;comment:订单类型0 普通订单,1 限时抢购, 2 团购 , 3 促销优惠"`
	PromId      uint   `form:"prom_id" json:"prom_id" gorm:"not null;default:0;comment:活动id"`

	IsComment      uint `form:"is_comment" json:"is_comment" gorm:"type:tinyint(1) not null;default:0;comment:是否评价 0 否 1 是"`
	IsSend         uint `form:"is_send" json:"is_send" gorm:"type:tinyint(1) not null;default:0;comment:0未知  1未发货，2已发货，3已换货，4已退货，5 已取消 ，6 已收货 "`
	OrderInvoiceId uint `form:"order_invoice_id" json:"order_invoice_id" gorm:"not null;default:0;comment:订单发货表order_invoice主键id"`
}
